package lifi

type Transfer interface {
	Init() error
	Start(collector Collector) error
	Stop()
	Process(d Data, acc Collector) error
}

type TransferFunc func(d Data, acc Collector) error

func (f TransferFunc) Init() error {
	return nil
}

var _ Transfer = TransferFunc(nil)

func (f TransferFunc) Stop() {
}

func (f TransferFunc) Start(collector Collector) error {
	return nil
}
func (f TransferFunc) Process(d Data, acc Collector) error {
	return f(d, acc)
}
